<template>
  <div class="dijia_box">
    <div class="dj_box">
      <div
        class="dj_heng"
        v-for="(item,index) in xianshiList.educationLIST"
        :key="index"
        @click="xianshidetail(item)"
      >
        <img
          :src="item.cover"
          alt=""
        >
        <div class="dj_wz">
          <div class="dj_wz_bt">{{item.title}} </div>
          <div class="dj_wz_jie">4课</div>
          <div class="dj_wz_price">
            <div class="dj_wz_price_th">限时特惠</div>
            <div class="dj_wz_price_yang">¥{{item.money}}&nbsp;&nbsp;<div class="dj_wz_price_line">¥{{item.y_money}}</div>
            </div>
          </div>
        </div>
      </div>
    </div>

  </div>
</template>

<script>
export default {
  props: ['xianshiList'],
  data () {
    return {}
  },
  methods: {
    xianshidetail (item) {
      console.log(item)
      this.$emit('xianshidetail', item)
      // this.$router.push({ name: '/coursedetails', params: { curriculumId: item.curriculum_id } })
    }
  },
  components: {},
  created () {
    // console.log(this.xianshiList)
  }
}
</script>
<style>
.dijia_box {
  width: calc(100vw * 670 / 750);
  margin: 0 auto;
}
.dj_box {
  /* padding-bottom: 20px; */
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  justify-content: space-between;
  align-content: space-between;
  align-items: center;
}
.dj_heng {
  display: inline-block;
  width: calc(100vw * 315 / 750);
  margin-bottom: 20px;
}
.dj_heng img {
  width: 100%;
  height: calc(100vw * 315 / 750 * 188 / 315);
  background-color: #cccccc;
  border-radius: 4px;
}
.dj_wz {
  width: 100%;
}
.dj_wz_bt {
  font-family: PingFangSC-Medium;
  font-size: 15px;
  font-weight: normal;
  font-stretch: normal;
  letter-spacing: 0px;
  color: #1a1a1a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 10px 0px;
}
.dj_wz_jie {
  font-family: PingFangSC-Medium;
  font-size: 12px;
  font-weight: normal;
  font-stretch: normal;
  letter-spacing: 0px;
  color: #999999;
  margin-bottom: 5px;
}
.dj_wz_price {
  font-family: PingFangSC-Medium;
  font-size: 16px;
  font-weight: normal;
  font-stretch: normal;
  letter-spacing: 0px;
  color: #DA4131;
  display: flex;
  flex-wrap: nowrap;
  flex-direction: row;
  justify-content: space-between;
  align-content: space-between;
  align-items: center;
}
.dj_wz_price div {
  display: inline-block;
}
.dj_wz_price_yang {
  font-family: PingFangSC-Medium;
  font-size: 14px;
  letter-spacing: 0px;
  color: #DA4131;
}
.dj_wz_price_line {
  text-decoration: line-through;
  font-size: 12px;
  letter-spacing: 0px;
  color: #cccccc;
}
.dj_wz_price_th {
  display: flex !important;
  justify-content: center;
  align-items: center;
  padding: 5px 5px 5px 5px;
  font-size: 9px;
  font-weight: normal;
  font-stretch: normal;
  letter-spacing: 0px;
  color: #DA4131;
  text-align: center;
  border: 1px solid #DA4131;
  border-radius: 17px;
}
</style>
